﻿@using NetSurveillance.WebApp.DataServices.Models
@model IEnumerable<CasePermission>

<table id="tbCasePmsConfig">
    <tbody>
        @{int i = 1;}
        @foreach(var casePms in Model)
        {
            <tr>
                <td>
                    @casePms.User.UserName
                </td>
                <td>
                    <label>
                        @Html.RadioButton("pms"+i, 0, casePms.Permission == 0, new { id = "pms_none" + casePms.Id })
                        无
                    </label>
                </td>
                <td>
                    <label>
                        @Html.RadioButton("pms"+i, 4, (casePms.Permission & PermissionType.Selete) == PermissionType.Selete, new { id = "pms_read" + casePms.Id })
                        可读
                    </label>
                </td>
                <td>
                    <label>
                        @Html.RadioButton("pms"+(i++), 15, ((int)casePms.Permission == 15), new { id = "pms_write" + casePms.Id })
                        读写
                    </label>
                    @Html.Hidden("pms_id", casePms.Id)
                    @Html.Hidden("pms_userId", casePms.UserId)
                </td>
            </tr>
        }
    </tbody>
</table>